iptables
iptables -F
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
sudo iptables -t nat -A POSTROUTING -j MASQUERADE
iptables -t nat -A POSTROUTING -o usb0 -j MASQUERADE
sudo apt-get install iptables-persistent
该组件默认会将防火墙规则保存到
sudo vim /etc/iptables/rules.v4
#保存现有规则
sudo service netfilter-persistent save
#读取并应用先有规则
sudo service netfilter-persistent reload